/*    */ package com.hp.bon.sgw.core.channel.handler;
/*    */ 
/*    */ import cn.chinatelecom.sgw.soap.SgwQueryAck;
/*    */ import com.hp.bon.sgw.util.Comutils;
/*    */ import java.io.PrintStream;
/*    */ 
/*    */ public class TuxedoCallHandler extends BaseWSCallHandler
/*    */ {
/*    */   public TuxedoCallHandler(PrintStream printStream)
/*    */   {
/* 20 */     super(printStream);
/*    */   }
/*    */ 
/*    */   protected String convertResponseString(SgwQueryAck sgwQueryAck)
/*    */   {
/* 25 */     StringBuilder sb = new StringBuilder();
/* 26 */     sb.append("<SgwTuxedoSvc>\r\n");
/* 27 */     sb.append(String.format("<RTT>%s</RTT>\r\n", new Object[] { Comutils.formatTime(System.currentTimeMillis(), "yyyyMMddHHmmss") }));
/*    */ 
/* 29 */     sb.append(String.format("<SIG>%s</SIG>\r\n", new Object[] { sgwQueryAck.getSIG() == null ? "" : sgwQueryAck.getSIG() }));
/* 30 */     sb.append(String.format("<RC>%s</RC>\r\n", new Object[] { sgwQueryAck.getRC() == null ? "" : sgwQueryAck.getRC() }));
/* 31 */     sb.append(String.format("<DS>%s</DS>\r\n", new Object[] { sgwQueryAck.getDS() == null ? "" : sgwQueryAck.getDS() }));
/*    */ 
/* 33 */     if ((sgwQueryAck.getDATA() == null) || (sgwQueryAck.getDATA().length() == 0)) {
/* 34 */       sb.append("<DATA></DATA>\r\n");
/*    */     } else {
/* 36 */       sb.append("<DATA>\r\n");
/* 37 */       sb.append(sgwQueryAck.getDATA());
/* 38 */       sb.append("</DATA>\r\n");
/*    */     }
/* 40 */     sb.append("</SgwTuxedoSvc>\r\n");
/* 41 */     return sb.substring(0);
/*    */   }
/*    */ 
/*    */   public int getProtocolType()
/*    */   {
/* 46 */     return 3;
/*    */   }
/*    */ }

/* Location:           C:\Users\think\Desktop\sgw_2.1.jar
 * Qualified Name:     com.hp.bon.sgw.core.channel.handler.TuxedoCallHandler
 * JD-Core Version:    0.6.1
 */